package com.cx.model.ai;

import com.cx.model.ai.entity.AiDto;
import com.cx.entity.RestResp;
import com.cx.model.ai.service.Base;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/ai")
public class AiController {
    @PostMapping("/doAi")
    public RestResp doAi(@RequestBody AiDto aiDto) {
        // 添加日志，打印接收到的参数
        System.out.println("Received aiDto: " + aiDto.toString());

        RestResp restResp = Base.doAiService(aiDto);
        return restResp;
    }
}